import { Suspense } from 'react';
import { Spin } from 'antd';

export default function SuspenseLoading({ children }) {
  return (
    <Suspense
      fallback={
        <Spin
          style={{
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center',
            minHeight: 500,
            fontSize: 24
          }}
          tip="页面加载中...."
        >
          {null}
        </Spin>
      }
    >
      {children}
    </Suspense>
  );
}
